package org.dromara.stock.domain.bo;

import org.dromara.stock.domain.StockInfo;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 股票详情业务对象 stk_stock_info
 *
 * @author dongfs
 * @date 2024-06-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = StockInfo.class, reverseConvertGenerate = false)
public class StockInfoBo extends BaseEntity {

    /**
     * 编码
     */
    @NotBlank(message = "编码不能为空", groups = { EditGroup.class })
    private String code;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * GP(股票),ZS(指数)
     */
    @NotBlank(message = "GP(股票),ZS(指数)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 实时价格
     */
    @NotNull(message = "实时价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal currentPrice;

    /**
     * 开盘价
     */
    @NotNull(message = "开盘价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal openPrice;

    /**
     * 收盘价
     */
    @NotNull(message = "收盘价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal closePrice;

    /**
     * 最高价
     */
    @NotNull(message = "最高价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal highPrice;

    /**
     * 开盘截至目前最低价
     */
    @NotNull(message = "开盘截至目前最低价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal lowPrice;

    /**
     * 开盘后价格变化
     */
    @NotNull(message = "开盘后价格变化不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal changePrice;

    /**
     * 价格变化,单位为百分比
     */
    @NotNull(message = "价格变化,单位为百分比不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal changePercent;

    /**
     * 换手率 单位百分比
     */
    @NotNull(message = "换手率 单位百分比不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal turnoverRate;

    /**
     * 成交量 单位手
     */
    @NotNull(message = "成交量 单位手不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long volume;

    /**
     * 总市值 单位亿
     */
    @NotNull(message = "总市值 单位亿不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long totalWorth;


}
